<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<title> 商品分类 </title>

<?php include VIEWS.'admin/style.html'?>

</head>

<body>

<?php include VIEWS.'admin/head.html'?>

<ul id="submenu">
	<li><a href='items.php'>商品列表</a></li>
	<li><a href='itemsedit.php?add=1'>新增商品</a></li>
	<li><a href='itemscats.php' class="current">商品分类</a></li>
    <li><a href='alert.php'>商品需求</a></li>
</ul>

<div id="body">

    <a href="itemscatsadd.php">&raquo; <b>新增顶级分类</b></a><br /><br />

<?php if (count($list['list'])==0):?><table style="border: 1px solid #aa0000;" width="100%" border="0" align="left" bgcolor="#FFE5E5" cellpadding="4" cellspacing="0"> <tr> <td> <div class="errorheader">目前暂时没有任何商品分类。</div> </td> </tr> </table><br /><br clear="all">

<?php else:?>

<table class="reportV2" cellpadding="5" width="98%" cellspacing="0">
<tr class="columntitle"><td>&nbsp;</td><td>分类名称</td><td>操作</td></tr>
<?php 
foreach ($list['list'] as $v):
$itemsslist_i++;
?>
<tr><td>&nbsp;</td><td style="text-align:left"><b><?php echo $v['name']?></b></td><td><a href="itemscatsedit.php?id=<?php echo $v['id']?>">修改</a> - <a href="javascript:cRedirect('itemscatsedit.php?id=<?php echo $v['id']?>&remove=1', '确定要删除分类 “<?php echo $v['name']?>” 商品吗？')">删除</a> - <a href="itemscatsadd.php?pid=<?php echo $v['id']?>">添加新分类</a></td></tr>
<?php foreach ($v['list'] as $vv):?>
<tr><td>&nbsp;</td><td style="text-align:left;padding-left:40px"><?php echo $vv['name']?></td><td><a href="itemscatsedit.php?id=<?php echo $vv['id']?>">修改</a> - <a href="javascript:cRedirect('itemscatsedit.php?id=<?php echo $vv['id']?>&remove=1', '确定要删除分类 “<?php echo $vv['name']?>” 商品吗？')">删除</a></td></tr>
<?php endforeach;?>
<?php endforeach;?>
</table>
<?php endif;?>

<?php include VIEWS.'admin/runtime.html'?>

</div>

<script type="text/javascript">
Element.addClassName('am3', 'current');
</script>

</body>
</html>
